package com.snow.rbac.entity.excel;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import cn.afterturn.easypoi.handler.inter.IExcelModel;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * All rights Reserved, Designed By www.cusc.com
 *
 * @author yanke
 * @Title: UserInfoExcelOut
 * @Package com.snow.rbac.entity.excel
 * @Description:类描述
 * @Email yanke@cu-sc.com
 * @version: v1.0.0
 * @date: 2021/6/23/0023 14:52
 * @Copyright: 2021  www.faw.com.cn Inc. All rights reserved. <br/>
 * Modification History:<br/>
 * Date         Author          Version            Description<br/>
 * *---------------------------------------------------------*<br/>
 * 2021/6/23/0023     Administrator           v1.0.0               修改原因<br/>
 * @since JDK 1.8
 */
@Data
public class UserInfoExcelIn implements IExcelDataModel, IExcelModel {
    private String errorMsg;
    private Integer rowNum;
    /**
     * 手机号
     */
    @Excel(name = "手机号")
    @NotEmpty(message = "手机号不能为空")
    private String username;

    /**
     * 姓名
     */
    @Excel(name = "名字")
    @NotEmpty
    private String name;

    /**
     * 密码
     */
    @Excel(name = "密码")
    @NotEmpty
    private String password;

    @Excel(name = "角色")
    @NotEmpty
    private String role;

    /**
     * 是否管理员
     */
    @Excel(name = "是否管理员")
    @NotNull
    private Integer isAdmin;

    @Override
    public int getRowNum() {
        return rowNum;
    }

    @Override
    public void setRowNum(int i) {
        this.rowNum = i;
    }
}
